package com.webserver.vo;

import java.io.Serializable;

/**
 * VO:value object 值对象
 * 这种对象仅仅用来保存一组数据使用
 *
 * 该类的每一个实例用于表示一个用户信息
 */
public class User implements Serializable {
    private String username;
    private String passwrod;
    private String nickname;
    private int age;

    public User(String username, String passwrod, String nickname, int age) {
        this.username = username;
        this.passwrod = passwrod;
        this.nickname = nickname;
        this.age = age;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasswrod() {
        return passwrod;
    }

    public void setPasswrod(String passwrod) {
        this.passwrod = passwrod;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", passwrod='" + passwrod + '\'' +
                ", nickname='" + nickname + '\'' +
                ", age=" + age +
                '}';
    }
}
